package com.khyr.controller;

import com.khyr.entity.DictData;
import com.khyr.service.DictDataService;
import com.khyr.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 宋一恒
 * @version 1.0
 */
@RestController
@RequestMapping(value ="/systemManager/dictData")
public class DictDataController {

    @Autowired
    private DictDataService dictDataService;
    @GetMapping(value ="/{dictType}")
    public R<List<DictData> > getDictDataByType(@PathVariable String dictType){
        return  dictDataService.getDictDataByType(dictType);
    }
}
